//第1关 编写一个代表三角形的类

package step1;

import java.util.Scanner;

public class Triangle {
	// 自行设计类的实现
	/********** Begin **********/
	private double a;
	private double b;
	private double c;
	
	public Triangle() {
		
	}
	
	public Triangle(double a, double b, double c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}
	
	public double getA() {
		return a;
	}

	public void setA(double a) {
		this.a = a;
	}

	public double getB() {
		return b;
	}

	public void setB(double b) {
		this.b = b;
	}

	public double getC() {
		return c;
	}

	public void setC(double c) {
		this.c = c;
	}
	
	public double getArea() {
		double s = (a+b+c)/2;
		return Math.sqrt(s*(s-a)*(s-b)*(s-c));
	}
	
	public double getGirth() {
		double girth = a + b + c;
		return girth;
	}

	public String toString() {
		return "三角形(" + a + "," + b + "," + c + ")";
	}

	/********** End **********/

	public static void main(String[] args) {
		/********** Begin **********/
		Scanner sc = new Scanner(System.in);
		double a,b,c; //定义三条边
		a = sc.nextDouble();
		b = sc.nextDouble();
		c = sc.nextDouble();
		Triangle t1 = new Triangle(a, b, c);
		//输出面积
		System.out.println(t1 + "的面积为:" + String.format("%.2f",t1. getArea())); 
		//输出周长
		System.out.println(t1 + "的周长为:" + String.format("%.2f",t1.getGirth()));	
		/********** End **********/
	}
}